How can I be able to create a folder node on companyhome in Alfresco? [migrated]

Posted by bluestella on Programmers See other posts from Programmers or by bluestella
Published on 2011-06-24T05:59:33Z Indexed on 2011/06/24 8:30 UTC
Read the original article Hit count: 140

Filed under:
|
|

I am having a hard time looking for an answer to my question. I am trying to create a folder/space in Alfresco. But I don't have any idea doing it? Can someone help me with this? I'm using Java webscript.

All I am at is this:

package org.alfresco.module.demoscripts;

import java.io.IOException;

import org.alfresco.web.scripts.AbstractWebScript;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.json.JSONException;
import org.json.JSONObject;

public class SimpleWebScript extends AbstractWebScript
{
    public void execute(WebScriptRequest req, WebScriptResponse res)
        throws IOException
    {
        try
        {
            // build a json object
            JSONObject obj = new JSONObject();

            // put some data on it
            obj.put("field1", "data1");

            // build a JSON string and send it back
            String jsonString = obj.toString();
            res.getWriter().write(jsonString);
        }
        catch(JSONException e)
        {
            throw new WebScriptException("Unable to serialize JSON");
        }
    }    
}

© Programmers or respective owner

Related posts about java

Related posts about Web